package com.carboy.launch.utils;

import java.util.Date;

import android.os.Environment;

public class Constants {

	/** 数据库名 */
	public static final String DATABASE_NAME = "carnav.db";

	/** SDCard路径 */
	public static final String BASE_SD_PATH = Environment
			.getExternalStorageDirectory().getAbsolutePath();

	/** 设置音频保存路径 -- 科大讯飞录音 */
	public static final String SPEECH_AUDIO_PATH = BASE_SD_PATH
			+ "/carnav/kdxf/";

	/** 设置录像保存路径 */
	public static final String RECORD_VIDEO_PATH = BASE_SD_PATH
			+ "/carnav/record/";

	/** 设置相机拍照图片保存路径 */
	public static final String CAMERA_IMAGE_PATH = BASE_SD_PATH
			+ "/carnav/camera/";

	/** 异常保存 */
	public static final String CARCH_SD_PATH = BASE_SD_PATH + "/carnav/carch/";

	/** 屏幕宽度 */
	public static int SCREENT_WIDTH = 0;

	/** 屏幕高度 */
	public static int SCREENT_HEIGHT = 0;

	/** 导航类型 */
	public static final String NAVI_TYPE = "navi_type";
	public static boolean clouddogConected = false;
	/*** AIDL *****/
	public static final String ACTION_CONNECT_DVR = "action.jwd.aidl.dvr";

	public static boolean isFirstBroad = true;
	public static boolean isFirstBroad2 = true;
	public static boolean isFirstBroad3 = true;
	public static boolean isFirstRes = true;
	public static String ACCTKEY = "ACCKEY";
	public static boolean isfalseconnectfail = true;
	public static boolean isRegist = true;

	/******************* 广播 ********************/
	// 系统休眠广播
	public static final String RECIVER_ACTION_SLEEP = "android.intent.action.SYSTEM_ACCDORMANT_TIMELY";// 休眠广播
	public static final String RECIVER_ACTION_DELAY_SLEEP = "android.intent.action.SYSTEM_ACCDORMANT";// 延时休眠广播
	public static boolean isSleep = false;
	public static boolean isShake = false;
	public static Date mDate = null;

	public static String isShakeTime = null;

	/** DVR 906DVR操作大多用aidl控制 */
	public static final String RECIVER_ACTION_STARTDVR = "android.intent.action.ACTION_ACCSCREENON_STARTDVR";// 906启动DVR服务
	public static final String ACTION_SEND_ANTI_THEFT = "android.intent.action.ACTION_SEND_ANTI_THEFT";// 振动广播
	// 902
	public static final String DVR_TAKE_PICTURE = "action.TAKE_PICTURE";// 拍照
	public static final String DVR_PICTURE_SAVE = "com.android.camera.NEW_PICTURE_FORUSER";// 拍照成功
	public static final String DVR_TAKE_RECORDING = "action.cxsz.video.request";// 拍视频
	public static final String DVR_VIDEO_SAVE = "action.cxsz.upload.video";// 视频保存成功
	public static final String DVR_VIDEO_PATH = "action.VIDEO.PATH";// 视频地址
	public static final String DVR_PICTURE_PATH = "action.PICTURE.PATH";// 照片地址

	public static final String REQUEST_TAKE_PICTURE = "action.REQUEST.TAKE_PICTURE";// 拍照指令
	public static final String REQUEST_TAKE_RECORDING = "action.REQUEST.TAKE_VIDEO";// 拍视频指令

	public static final String REQUEST_STOP_RECORD = "action.REQUEST.STOP_RECORD";// 停止录像
	public static final String REQUEST_START_RECORD = "action.REQUEST.START_RECORD";// 开始录像

	// 打开关闭雷达
	public static final String ACTION_RADAR_OPEN = "action.open.radar";// 打开
	public static final String ACTION_RADAR_CLOSE = "action.close.radar";// 关闭
	// FM
	public static final String ACION_OPEN_FM = "android.intent.action.FMSTATE";
	//打开设置
	public static final String ACTION_OPEN_SETTING = "com.carboy.action.OPEN_SETTING";
	// 关闭设置
	public static final String ACTION_CLOSE_SETTING = "com.carboy.action.CLOSE_SETTING";
	// 关闭关于
	public static final String ACTION_CLOSE_ABOUT = "action.close.about";
	// 语音点亮屏幕广播
	public static final String ACTION_SCREEN_ON = "action.screen.on";

	// public static final String DVR_BURGLAR_TAKE_PICTURE =
	// "com.cxsz.shake.takepic";// 仅用于防盗报警拍照
	// 振动报警
	public static final String ACTION_CAR_BUGRALAR = "com.szcx.system.sleepCount";// 车辆振动

	// 语音发广播给launcher，标记当前语音还在运行时间内
	public static final String VOICE_TO_LAUNCHER_TIME = "action.killvoice.tagtime";
	public static long killvoice_time = 0;
	public static long killvoice_maxtime = 600000;

	public static boolean isBurglarStop = false;// 标记是防盗报警关闭语音 true时，循环不关闭
	// 速度阈值，当摇晃速度达到这值后产生作用
	public static final int SPEED_SHRESHOLD = 2;
	// 两次检测的时间间隔
	public static final int UPTATE_INTERVAL_TIME = 500;
	// 振动多久上报一次1分钟
	public static final int SEND_TIME = 60000;
	public static boolean isshow = false;
	public static boolean fromVoice = false;
	public static boolean fromClouldService = false;
	// 标记是语音调用DVR拍照
	public static boolean isVoiceDvr = false;
	// 安装apk路径
	public static String installPath = null;
	public static boolean isUpdate = false;
	public static boolean firstBroad = true;
	public static final String wifiDbPath = "/data/data/com.huixin.carnav/wifi.db";
	public static String updateapp = "";
	public static boolean firstcheckimei = true;
	public static boolean firstchecksn = true;

	// 标记GPS连上播报过
	public static boolean gpsSpeak = false;
	// 标记SD卡不存在播报过
	public static boolean sdSpeak = false;
	public static boolean firstcheckgps = true;

	// --------------------振动报警功能开关----------------------
	public static final boolean openBurglar = true;
	
	public static final String ACTION_CLOSE_APP = "com.rmt.action.KILL_PACKAGE";
	public static final String ACTION_ACC_OVER_CALLBACK = "android.intent.action.ACC_OVER_CALLBACK";
}
